package com.charlotte.study.gupao.adapter.login.v2.adapters;

import com.charlotte.study.gupao.adapter.login.v1.BaseResponse;

import java.util.Map;

/**
 * @author junjie.ding
 * @date 2020/3/11
 */
public class LoginForWeiboAdapter extends AbstractAdapter {
    @Override
    public boolean support(Object object) {
        return object instanceof LoginForWeiboAdapter;
    }

    @Override
    public BaseResponse login(Map objects, ILoginAdapter object) {
        if(!support(object)){
            return null;
        }
        return loginForWeibo(objects);
    }

    private BaseResponse loginForWeibo(Map objects){
        // 具体实现
        return new BaseResponse("200", "微博 登录成功", null);
    }
}
